import gameMapTemplateConfig from "./components/game-map-template-config.vue";
import ToolActionApi from "@/tool/http/tool-action.js";

let elementAction = ToolActionApi.init("game_element");
let mapTemplateAction = ToolActionApi.init("game_map_template");

const rule = {
  queryParams: [],
  metaConfig: {},
  extendFields: [{ memo: "地图配置", component: gameMapTemplateConfig }],
};

export default async function () {
  rule.metaConfig.element_id = {
    dictList: await elementAction.dict(),
  };
  rule.metaConfig.map_template_id = {
    dictList: await mapTemplateAction.dict(),
  };
  return rule;
}
